How to insert a bullet into a Object Text?

Does anybody know how to insert a bullet into the Object Text attribute?
SystemAdmin - Thu Jun 24 10:50:14 EDT 2010

Re: How to insert a bullet into a Object Text?
a_vestlin - Thu Jun 24 11:02:44 EDT 2010

Hi,

You can use

string applyTextFormattingToParagraph(string s, bool addBullets, int indentLevel, int paraNumber)


See the DXL reference manual.

/Anders

Re: How to insert a bullet into a Object Text?
llandale - Fri Jun 25 14:51:41 EDT 2010

a_vestlin - Thu Jun 24 11:02:44 EDT 2010

Hi,

You can use

string applyTextFormattingToParagraph(string s, bool addBullets, int indentLevel, int paraNumber)


See the DXL reference manual.

/Anders

Never actually done that, so I practiced:

Buffer buf = create
buf  = "When XYZ occurs the system shall:\n"
buf += applyTextFormattingToParagraph("Do A\n", true, 2, 0)
buf += applyTextFormattingToParagraph("Disable B\n", true, 1, 0)
buf += "And then shut down\n"
buf += applyTextFormattingToParagraph("And shut down again", false, 1, 0)
(current Object)."Object Text" = richText(tempStringOf(buf))
delete(buf)

 


Don't see what Indent Level and paragraphNumber do. Am surprised that the 'And then shut down' is also bulleted, I guess you have to turn off bullets with another call. Got odd results combining the two bulletted paragraphs in one call.

 

 

 

  • Louie

 

 

Re: How to insert a bullet into a Object Text?
SystemAdmin - Fri Jun 25 15:34:33 EDT 2010

llandale - Fri Jun 25 14:51:41 EDT 2010

Never actually done that, so I practiced:

Buffer buf = create
buf  = "When XYZ occurs the system shall:\n"
buf += applyTextFormattingToParagraph("Do A\n", true, 2, 0)
buf += applyTextFormattingToParagraph("Disable B\n", true, 1, 0)
buf += "And then shut down\n"
buf += applyTextFormattingToParagraph("And shut down again", false, 1, 0)
(current Object)."Object Text" = richText(tempStringOf(buf))
delete(buf)

 


Don't see what Indent Level and paragraphNumber do. Am surprised that the 'And then shut down' is also bulleted, I guess you have to turn off bullets with another call. Got odd results combining the two bulletted paragraphs in one call.

 

 

 

  • Louie

 

 

Thanks a lot for your help. I created this DB to make it more easier to on and off the bullets. The reason I had to do this it was because even though I turned off the removing heading number in the Export To DOORS Tool from Word, DOORS did not recognized it and i had to check more that 300 pages which most of the had bullets, so i created this kind of DB to avoid double clicking and then click the bullet icon. I also had another program where i was able to select a bulk of objects that were suppose to have bullets filter it and turn on the bullets. Once again thanks a lot.

DB Win
DBE addBulled, remBulled
 
void formatAddBullet(DBE){
    string getText = richText((current Object).("Object Text"))
        (current Object).("Object Text") = richText(applyTextFormattingToParagraph(getText, true, 0, 0))
        refresh(current Module)
}
 
void formatRemoveBullet(DBE){
        string getText = richText((current Object).("Object Text"))
        (current Object).("Object Text") = richText(applyTextFormattingToParagraph(getText, false, 0, 0))
        refresh(current Module)
}
 
Win = centered("Format Text")
addBulled = button(Win, "Add Bullet", formatAddBullet)
beside(Win)
remBulled = button(Win, "Rem Bullet", formatRemoveBullet)
 
raise(Win)

Re: How to insert a bullet into a Object Text?
lhall122 - Thu Jul 01 14:53:04 EDT 2010

I wasn't sure if you were looking for a DXL or a quick way to insert a bullet into your object text.

Right-click on toolbar and select "Formatting". This will give you buttons to insert bullets and indent your text. You will need to double-click in your object prior to selecting button.
Attachments

attachment_14482761_Bullet.jpg